<template>
    <Header />
    <!-- PC端 -->
    <div class="main-container hidden-xs-only">
        
        <div class="swiper-container">
            <div class="block">
                <el-carousel height="400px" interval="5000">
                    <el-carousel-item v-for="item in 4" :key="item">
                        <img class="swiper-image" src="../static/image.png" alt="">
                    </el-carousel-item>
                </el-carousel>
            </div>
        </div>
        <div class="previewByDate">
            <div class="title">
                展会预览
                <el-icon color="#fff"><Share /></el-icon>
            </div>
            <div class="datechoose">
                <el-date-picker v-model="exhibitionDate" type="date" placeholder="选择日期" :size="size" />
            </div>
        </div>
        <div class="exhibitionList-container">
            <div class="exhibition-item" v-for="(item, index) in 7" :key="index" @click="goDetailPage">
                <img class="item-image" src="../static/image.png" alt="">
                <div class="item-info">
                    <div class="item-title">
                        2023 年上海会展业创新发展峰会暨第九届“国际组展人之声”论坛
                    </div>
                    <div>
                        <div>
                            <div class="item-city">-琶洲市</div>
                            <div class="item-address">-广东省琶洲市九星大地会展中心</div>
                            <div class="item-time">-2024年1月11日-1月13日</div>
                        </div>
                        <div class="item-btn">
                            <el-button type="primary" round>热订中</el-button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 手机端 -->
    <div class="main-container2 hidden-sm-and-up">
        <div class="swiper-container">
            <div class="block">
                <el-carousel height="400px" interval="5000">
                    <el-carousel-item v-for="item in 4" :key="item">
                        <img class="swiper-image" src="../static/image.png" alt="">
                    </el-carousel-item>
                </el-carousel>
            </div>
        </div>
        <div class="previewByDate">
            <div class="title">
                展会预览
                <el-icon color="#fff"><Share /></el-icon>
            </div>
            <div class="datechoose">
                <el-date-picker v-model="exhibitionDate" type="date" placeholder="选择日期" :size="size" />
            </div>
        </div>
      
        <div class="exhibitionList-container">
            <div class="exhibition-item" v-for="(item, index) in 7" :key="index">
                <img class="item-image" src="../static/image.png" alt="">
                <div class="item-info">
                    <div class="item-title">
                        2023 年上海会展业创新发展峰会暨第九届“国际组展人之声”论坛
                    </div>
                    <div>
                        <div>
                            <div class="item-city">-琶洲市</div>
                            <div class="item-address">-广东省琶洲市九星大地会展中心</div>
                            <div class="item-time">-2024年1月11日-1月13日</div>
                        </div>
                        <div class="item-btn">
                            <el-button type="primary" round>热订中</el-button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="describe">
            <div class="des-title">
                我们为展会活动提供会议期间的酒店优惠价格
            </div>
            <div class="des-containr">
                <div class="des-img">
                    <img src="../static/1709883139892.jpg" alt="">
                </div>
                <div class="des-content">
                    <p>2022年， CSE上海泳池SPA展进入第四个年头，乘着每年高速发展的东风，展会规模持续升级，品类也将有更精细化的划分。</p>
                    <p>将休闲水生态产业划分为公共泳池和私家泳池两大门类，加强新产品宣传展示，强化贸易功能，加大专业观众邀请力度，突出市场对接功能，增强现场交流与合作洽谈，为休闲水全行业搭建一个大体量、高质量的一体式速效沟通平台。
                    </p>
                    <p> CSE上海游泳SPA展全称：中国（上海）国际泳池设施、游泳装备及温泉SPA展览会，CSE SHANGHAI
                        2021由国体认证中心、京东运动、上海德纳展览服务有限公司联合主办，国内游泳行业先锋杂志《游泳与装备》作为全程合作媒体。
                        2022CSE上海国际沐浴SPA健康产业博览会
                    </p>
                    <p>2022CSE上海国际婴幼儿游泳产业展览会</p>
                </div>

            </div>
            <div class="des-title">
                300+酒店任你挑选
            </div>
            <div class="skyblue-bg">
                <div>独家的会议期间的优惠价格</div>
                <div>点击预订</div>
            </div>
            <div class="seebtn">
                <el-button type="primary" size="large" round>查 看</el-button>
            </div>
        </div>
    </div>
    <Footer />
</template>
<script lang="ts" setup>
    import Header from '@/components/Header.vue'
    import { useI18n } from 'vue-i18n'
    import Footer from '@/components/Footer.vue'
    const { t, locale } = useI18n()
    import { ref } from 'vue'
    import router from '@/router'
    const liveDate = ref('')
    const exhibitionDate = ref('')
    // 跳转到详情页
    const goDetailPage = () => {
        console.log('goDetailPage')
        router.push({
            name: 'exhibitionDetail',
        })
    }
    const shortcuts = [
        {
            text: 'Last week',
            value: () => {
                const end = new Date()
                const start = new Date()
                start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
                return [start, end]
            },
        },
        {
            text: 'Last month',
            value: () => {
                const end = new Date()
                const start = new Date()
                start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
                return [start, end]
            },
        },
        {
            text: 'Last 3 months',
            value: () => {
                const end = new Date()
                const start = new Date()
                start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
                return [start, end]
            },
        },
    ]
</script>
<style lang="scss" scoped>
    @import '@/assets/variables.scss';

    .main-container2 {
        .previewByDate{
            display: flex;
            height: 50px;
            color: #fff;
            background-color: #356CEB;
            padding: 0 20px;
            align-items: center;
            max-width: $border-primary-max-width;
            margin: 30px auto;
            justify-content: space-between;
            .title{
                display: flex;
                gap: 10px;
                align-items: center;
            }
        }
        .describe {
            width: 90%;
            display: flex;
            align-items: center;
            flex-direction: column;
            justify-content: center;
            margin: 0 auto;
            padding: 20px 0;

            .des-title {
                font-size: 26px;
                font-weight: 700;
                color: #475669;
                display: flex;
                align-items: center;
                justify-content: center;
                margin-bottom: 20px;
            }

            .des-containr {
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;

                .des-img {
                    width: 100%;
                    height: 200px;
                    margin-bottom: 20px;
                    width: 100%;
                    height: 300px;

                    img {
                        width: 100%;
                        height: 100%;
                        object-fit: cover;
                    }
                }

                .des-content {
                    width: 100%;
                    font-size: 18px;
                    color: #475669;
                    margin-bottom: 20px;

                    p {
                        margin-bottom: 20px;
                    }
                }
            }


            .skyblue-bg {
                display: flex;
                justify-content: center;
                align-items: center;
                padding: 20px 40px;
                width: 100%;
                border-radius: 10px;
                background-image: url('../static/indeximage2.png');
                flex-direction: column;
                background-size: 374px 126px;
                background-repeat: no-repeat;
                background-position: 50% 50%;
                color: #356CEB;
                font-size: 14px;
                font-weight: 600;

            }

            .seebtn {
                display: flex;
                justify-content: center;

            }
        }

        .exhibitionList-container {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-wrap: wrap;

            max-width: $border-primary-max-width;
            margin: 0 auto;

            .exhibition-item:hover {
                box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.3);
            }

            .exhibition-item {
                border-radius: 10px;
                width: 90%;
                margin-bottom: 40px;
                border: 1px solid #ccc;

                .item-image {
                    width: 100%;
                    height: 200px;
                    border-radius: 10px 10px 0 0;
                    object-fit: cover;

                }

                .item-info {
                    padding: 10px 20px 20px 20px;

                    .item-title {
                        font-size: 20px;
                        font-weight: 700;
                        color: #475669;
                        margin-bottom: 10px;
                    }

                    .item-city {
                        font-size: 14px;
                        color: #475669;
                        margin-bottom: 10px;
                    }

                    .item-address {
                        font-size: 14px;
                        color: #475669;
                        margin-bottom: 10px;
                    }

                    .item-time {
                        font-size: 14px;
                        color: #475669;
                        margin-bottom: 10px;
                    }

                    .item-btn {
                        display: flex;
                        justify-content: flex-end;
                    }
                }

            }
        }

        .swiper-container {
            background-color: #fff;

            margin: 0 auto;

            .swiper-image {
                width: 100%;
                height: 400px;
                object-fit: cover;
            }
        }

        .chooseTime {
            position: relative;
            box-sizing: border-box;
            display: flex;
            justify-content: center;
            flex-direction: column;
            align-items: center;
            border-radius: 10px;
            margin: 40px auto;
            box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.3);
            width: 90%;

            .city {
                display: flex;
                padding: 20px;
                flex-direction: column;
                border-bottom: 1px dashed #D8D8D8;
                width: 100%;

                .chooseTime-title {
                    font-size: 16px;
                    color: #817F7F;
                    margin-bottom: 10px;
                }

                .chooseTime-city {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    padding: 10px 20px;
                    border-bottom: 1px solid #D8D8D8;

                    .cityname {
                        font-size: 16px;
                        color: #817F7F;
                    }
                }
            }

            .exhibition {
                display: flex;
                padding: 20px;
                flex-direction: column;
                border-bottom: 1px dashed #D8D8D8;
                width: 100%;

                .chooseTime-title {
                    font-size: 16px;
                    color: #817F7F;
                    margin-bottom: 10px;
                }

                .chooseTime-city {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    padding: 10px 20px;
                    border-bottom: 1px solid #D8D8D8;

                    .cityname {
                        font-size: 16px;
                        color: #817F7F;
                    }
                }
            }

            .dateTime {
                display: flex;
                flex-direction: column;
                width: 100%;
                padding: 20px;

                .chooseTime-title {
                    font-size: 16px;
                    color: #817F7F;
                    margin-bottom: 10px;
                }

                .chooseTime-city {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    padding: 10px 20px;
                    border-bottom: 1px solid #D8D8D8;

                    .cityname {
                        font-size: 16px;
                        color: #817F7F;
                    }
                }
            }

            .destination {
                display: flex;
                flex-direction: column;
                width: 46%;

                .title {
                    font-size: 16px;
                    color: #817F7F;
                    margin-bottom: 10px;
                }

                .input-container {
                    input {
                        width: 100%;
                        height: 40px;

                        border: none;
                        border-bottom: 1px solid #D8D8D8;
                        padding: 0 10px;
                    }

                    input:focus {
                        outline: none;
                    }
                }
            }

            .cutline {
                position: absolute;
                width: 1px;
                height: 80px;
                background-color: #D8D8D8;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
            }

            .time-contaienr {
                display: flex;
                flex-direction: column;
                width: 46%;

                .time-title {
                    display: flex;
                    justify-content: space-between;
                    margin-bottom: 10px;

                    div {
                        font-size: 16px;
                        color: #817F7F;
                    }
                }

                .pickdate {
                    width: 100%;
                }
            }

        }

    }

    .main-container {
        .previewByDate{
            display: flex;
            height: 50px;
            color: #fff;
            background-color: #356CEB;
            padding: 0 20px;
            align-items: center;
            max-width: $border-primary-max-width;
            margin: 30px auto;
            justify-content: space-between;
            .title{
                display: flex;
                gap: 10px;
                align-items: center;
            }
        }
        .describe {
            max-width: $border-primary-max-width;
            margin: 0 auto;
            padding: 20px 0;

            .des-title {
                font-size: 26px;
                font-weight: 700;
                color: #475669;
                display: flex;
                align-items: center;
                justify-content: center;
                margin-bottom: 20px;
            }

            .des-containr {
                display: flex;

                .des-img {
                    width: 100%;
                    height: 200px;
                    margin-bottom: 20px;
                    margin-right: 40px;
                    width: 30%;
                    height: 300px;

                    img {
                        width: 100%;
                        height: 100%;
                        object-fit: cover;
                    }
                }

                .des-content {
                    width: 70%;
                    font-size: 18px;
                    color: #475669;
                    margin-bottom: 20px;

                    p {
                        margin-bottom: 20px;
                    }
                }
            }


            .skyblue-bg {
                display: flex;
                justify-content: center;
                align-items: center;
                padding: 20px 40px;
                height: 226px;
                border-radius: 10px;
                background-image: url('../static/indeximage2.png');
                flex-direction: column;
                background-size: cover;
                background-position: 0 50%;
                color: #356CEB;
                font-size: 16px;
                font-weight: 600;

                div {
                    margin-bottom: 10px;

                }
            }

            .seebtn {
                display: flex;
                justify-content: center;

            }
        }

        .exhibitionList-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;

            max-width: $border-primary-max-width;
            margin: 0 auto;

            .exhibition-item:hover {
                box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.3);
            }

            .exhibition-item {
                border-radius: 10px;
                width: 32%;
                margin-bottom: 40px;
                border: 1px solid #ccc;

                .item-image {
                    width: 100%;
                    height: 200px;
                    border-radius: 10px 10px 0 0;
                    object-fit: cover;

                }

                .item-info {
                    padding: 10px 20px 20px 20px;

                    .item-title {
                        font-size: 20px;
                        font-weight: 700;
                        color: #475669;
                        margin-bottom: 10px;
                    }

                    .item-city {
                        font-size: 14px;
                        color: #475669;
                        margin-bottom: 10px;
                    }

                    .item-address {
                        font-size: 14px;
                        color: #475669;
                        margin-bottom: 10px;
                    }

                    .item-time {
                        font-size: 14px;
                        color: #475669;
                        margin-bottom: 10px;
                    }

                    .item-btn {
                        display: flex;
                        justify-content: flex-end;
                    }
                }

            }
        }

        .swiper-container {
            background-color: #fff;

            margin: 0 auto;

            .swiper-image {
                width: 100%;
                height: 400px;
                object-fit: cover;
            }
        }

        .chooseTime {
            position: relative;
            box-sizing: border-box;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-radius: 10px;
            padding: 20px 40px;
            margin: 40px auto;
            box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.3);
            max-width: $border-primary-max-width;

            .destination {
                display: flex;
                flex-direction: column;
                width: 46%;

                .title {
                    font-size: 16px;
                    color: #817F7F;
                    margin-bottom: 10px;
                }

                .input-container {
                    input {
                        width: 100%;
                        height: 40px;

                        border: none;
                        border-bottom: 1px solid #D8D8D8;
                        padding: 0 10px;
                    }

                    input:focus {
                        outline: none;
                    }
                }
            }

            .cutline {
                position: absolute;
                width: 1px;
                height: 80px;
                background-color: #D8D8D8;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
            }

            .time-contaienr {
                display: flex;
                flex-direction: column;
                width: 46%;

                .time-title {
                    display: flex;
                    justify-content: space-between;
                    margin-bottom: 10px;

                    div {
                        font-size: 16px;
                        color: #817F7F;
                    }
                }

                .pickdate {
                    width: 100%;
                }
            }

        }

    }

    .el-carousel__item h3 {
        color: #475669;
        font-size: 14px;
        opacity: 0.75;
        background-image: url('../static/image.png');
        line-height: 150px;
        margin: 0;
    }

    .el-carousel__item:nth-child(2n) {
        background-color: #99a9bf;
    }

    .el-carousel__item:nth-child(2n + 1) {
        background-color: #d3dce6;
    }

    :deep(.el-range-editor.el-input__wrapper) {
        display: inline-flex;
        align-items: center;
        padding: 0 10px;
        width: 100%;
    }
</style>